import React, { PureComponent } from 'react';

// 引入 ECharts 主模块
import echarts from 'echarts/lib/echarts';
// 引入柱状图
import  'echarts/lib/chart/bar';
// 引入柱饼图
import  'echarts/lib/chart/pie';
 import  'echarts/lib/chart/line'; 
// 引入提示框和标题组件
import 'echarts/lib/component/tooltip';
import 'echarts/lib/component/title';
import 'echarts/lib/component/legendScroll';

import { Card, Tabs, Collapse, Table, Icon } from 'antd';
import styles from './Data.less';
const TabPane = Tabs.TabPane;

export default class Scatter extends PureComponent {
  componentDidMount() {
        // 基于准备好的dom，初始化echarts实例
        var myChart = echarts.init(document.getElementById('main-month'));
        // 绘制图表
        myChart.setOption({
            title: {
                text: '读者用户注册月统计分析',
                subtext: '数据来自网络'
            },
            xAxis: {
                type: 'category',
                data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
            },
            yAxis: {
                type: 'value'
            },
            series: [{
                data: [820, 932, 901, 934, 1290, 1330, 1320],
                type: 'line'
            }]
        })
    }
    

  render() {
    return (
      <div>
            <div id="main-month" style={{ width:1000, height: 550 }}></div>
    </div>
    );
  }
}
